<?php
/**
 * personal object
 */
global $CONFIG;
$page_owner = elgg_get_page_owner_entity ();
if ($page_owner === false || is_null ( $page_owner )) {
	$page_owner = elgg_get_logged_in_user_entity ();
	elgg_set_page_owner_guid ( elgg_get_logged_in_user_guid () );
}
$personal = elgg_extract('entity', $vars, FALSE);

$namelabel = elgg_echo ( 'resume:personal:name' );
$doblabel = elgg_echo ( 'resume:personal:dob');
$emaillabel = elgg_echo ( 'resume:personal:email' );
$genderlabel = elgg_echo ( 'resume:personal:gender' );
$phonelabel = elgg_echo ( 'resume:personal:phone' );
$addresslabel = elgg_echo ( 'resume:personal:address' );
$facultylabel = elgg_echo('resume:personal:faculty');
$moredetaillabel = elgg_echo ( 'resume:personal:moredetail' );

$nameview = elgg_view ( 'output/text', array (
		'value' => $personal->title,
) );
$dobview = elgg_view ( 'output/text', array (
		'value' => $personal->dob,
) );
$genderview = elgg_view ( 'output/text', array (
		'value' => $personal->gender,
) );
$phoneview = elgg_view ( 'output/text', array (
		'value' => $personal->phone,
) );
$addressview = elgg_view ( 'output/text', array (
		'value' => $personal->address,
) );
$moredetailview = elgg_view ( 'output/longtext', array (
		'value' => $personal->description,
) );
$emailview = elgg_view ('output/email', array (
		'value' => $personal->email 
) );
// Constant
$KTPM = 1;
$KHMT = 2;
$MMTTT = 3;
$HTTT = 4;

switch ($page_owner->faculty) {
	case $KTPM :
		$faculty = elgg_echo('uit:faculty:se');
		break;
	case $KHMT :
		$faculty = elgg_echo('uit:faculty:cs');
		break;
	case $MMTTT :
		$faculty = elgg_echo('uit:faculty:net');
		break;
	case $HTTT :
		$faculty = elgg_echo('uit:faculty:is');
		break;
	default :
		$faculty = elgg_echo('uit:faculty:other');
		break;
}
$facultyview = elgg_view('output/text', array('value' => $faculty))

?>
<div id="wrapcontent" >
<table id="personal_table" style="border: solid 0px #ffffff; width:100%;">
	<tbody>
		<tr>
			<td><?php echo $namelabel;?></td>
			<td><?php echo $nameview?>	
		</tr>
		<tr>
			<td><?php echo $doblabel;?></td>
			<td><?php echo $dobview?>
		</tr>
		<tr>
			<td><?php echo $genderlabel;?></td>
			<td><?php echo $genderview?>
		</tr>
		<tr>
			<td><?php echo $emaillabel;?></td>
			<td><?php echo $emailview?>
		</tr>
		<tr>
			<td><?php echo $doblabel;?></td>
			<td><?php echo $dobview?>
		</tr>
		<tr>
			<td><?php echo $phonelabel;?></td>
			<td><?php echo $phoneview?>
		</tr>
		<tr>
			<td><?php echo $addresslabel;?></td>
			<td><?php echo $addressview?>
		</tr>
		<tr>
			<td><?php echo $facultylabel;?></td>
			<td><?php echo $facultyview?>
		</tr>
		<tr>
			<td><?php echo $moredetaillabel;?></td>
			<td><?php echo $moredetailview?>
		</tr>
	</tbody>
</table>
</div>